package com.controller;

import com.javabean.Account;
import com.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
public class AccountController {
    @Autowired
    AccountService accountService;
    @RequestMapping("/findall")
    public String find(HttpServletRequest request){
        List<Account> all = accountService.findAll();
        request.setAttribute("msg",all);
        return  "data";
    }
}
